package liangtWorkSpace.springTest.impl;

import liangtWorkSpace.springTest.dao.PersonDao;
import liangtWorkSpace.springTest.dao.PersonService;

/**
 * @author liangt
 * @ClassName: PersonServiceImpl
 * @title: PersonServiceImpl
 * @projectName liangtWorkSpace.springTest.impl
 * @description: TODO
 * @date 2020/10/12 19:35
 */
public class PersonServiceImpl implements PersonService {
    private PersonDao personDao;

    /**
     * 提供Set方法，完成依赖注入
     * @param person
     */
    public void setPerson(PersonDao person){
        this.personDao = person;
    }
    @Override
    public void addPerson() {
        this.personDao.add();
        System.out.println("执行了addPerson方法");
    }


}
